package org.japo.java.basics.main;

import java.util.GregorianCalendar;

public class HoraAhora {

    public static void main(String[] args) {
        // Instanciar la clase
        GregorianCalendar gc = new GregorianCalendar();
        
        // Mostrar la hora
        int hor = gc.get(GregorianCalendar.HOUR_OF_DAY);
        int min = gc.get(GregorianCalendar.MINUTE);
        int seg = gc.get(GregorianCalendar.SECOND);
        System.out.printf("Hora: %02d:%02d:%02d\n", hor, min, seg);
    }
}